package ldh.im.fxbase.data.pojo;

import ldh.im.fxbase.data.pojo.status.ImLoginType;

import java.util.Date;

public class ImLogin {

    private String userId;
    private ImLoginType loginType;
    private String token;
    private String maskPassword;
    private Date updateTime;

    public String getUserId() {
        return userId;
    }

    public void setUserId(String userId) {
        this.userId = userId;
    }

    public String getToken() {
        return token;
    }

    public void setToken(String token) {
        this.token = token;
    }

    public String getMaskPassword() {
        return maskPassword;
    }

    public void setMaskPassword(String maskPassword) {
        this.maskPassword = maskPassword;
    }

    public Date getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }

    public ImLoginType getLoginType() {
        return loginType;
    }

    public void setLoginType(ImLoginType loginType) {
        this.loginType = loginType;
    }

    @Override
    public boolean equals(Object obj) {
        if (obj == null) return false;
        if(!(obj instanceof ImLogin)) return false;
        ImLogin imLogin = (ImLogin) obj;
        return imLogin.getUserId().equals(this.getUserId()) && imLogin.getLoginType() == this.loginType;
    }
}
